#include "headfile.h"

void UI_plot()
{
    LCD_DrawLine(0, lcddev.height / 4, lcddev.width, lcddev.height / 4);
    LCD_DrawLine(0, lcddev.height / 2, lcddev.width, lcddev.height / 2);
    LCD_DrawLine(0, lcddev.height * 3 / 4, lcddev.width, lcddev.height * 3 / 4);
}

// 波形显示
void wave_dispaly(float input[], int data_lenth,int div_1,int display_pos,int signal_gain)
{
    int i, j = 0;
    int div = data_lenth / lcddev.width;
    if (data_lenth < lcddev.width)
        div = 1;
    for (i = 0; i < lcddev.width - 1; i+=div_1)
    {
        LCD_DrawLine(i, display_pos - signal_gain * input[j], i + (int)div_1, display_pos - signal_gain * input[j + div]);
        j += div;
        if (j > data_lenth)
            break;
    }
}
